package com.gxa.controller.parking;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gxa.common.utils.R;
import com.gxa.common.utils.Result;
import com.gxa.entity.parking.Parking;
import com.gxa.entity.parking.ParkingSituation;
import com.gxa.mapper.parking.ParkingSituationMapper;
import com.gxa.service.parking.ParkingSituationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *停车场态势
 * @author yjl
 * @since 2022-10-11 10:05:39
 */
@Api(tags = "停车场态势")
@RestController
@RequestMapping("/situation")
public class ParkingSituationController {
    @Autowired
    private ParkingSituationService parkingSituationService;

    @CrossOrigin(origins = "*", maxAge = 3600)//跨越请求配置
    @ApiOperation("查询停车场数据")
    @GetMapping("/list")
    public Result selectAll(Integer pageNum,Integer pageSize){
        PageInfo<ParkingSituation> parkingSituationPageInfo = this.parkingSituationService.selectAll(pageNum, pageSize);
        return Result.success(parkingSituationPageInfo);

    }
}
